#include <stdio.h>

void swap(int *p1, int *p2);

int main(void)
{
	int a = 5, b = 10;
	
	printf("Before function call:\t");
	printf("a = %d, b = %d\n", a, b);
	swap(&a, &b);
	printf("After function call:\t");
	printf("a = %d, b = %d\n", a, b);
	
	return 0;
}

void swap(int *p1, int *p2)
{
	int temp;
	
	temp = *p1;
	*p1 = *p2;
	*p2 = temp;
}